% Quasi difference data

function yt_s=quasiDiff(yt,T,N,p,Theta)

%% Quasi-differencing data
yt_s = zeros(N,T);
yt_s(:,1) = yt(:,1);
for tx=2:T
        for lx=1:p
            yt_s(:,tx) = yt(:,tx) - Theta(:,1+N*(lx-1):N+N*(lx-1))*yt(:,tx-lx);       
        end
end




